/*! * SplitText 3.14.2 * https://gsap.com * * @license Copyright 2025, GreenSock. All rights reserved. Subject to the terms at https://gsap.com/standard-license. * @author: Jack Doyle */ (function(W,A){typeof exports=="object"&&typeof module!="undefined"?A(exports):typeof define=="function"&&define.amd?define(["exports"],A):(W=typeof globalThis!="undefined"?globalThis:W||self,A(W.window=W.window||{}))})(this,function(W){"use strict";let A,I,Z=typeof Symbol=="function"?Symbol():"_split",K,he=()=>K||Y.register(window.gsap),$=typeof Intl!="undefined"&&"Segmenter"in Intl?new Intl.Segmenter:0,q=e=>typeof e=="string"?q(document.querySelectorAll(e)):"length"in e?Array.from(e).reduce((t,i)=>(typeof i=="string"?t.push(...q(i)):t.push(i),t),[]):[e],ee=e=>q(e).filter(t=>t instanceof HTMLElement),Q=[],U=function(){},de={add:e=>e()},pe=/\s+/g,te=new RegExp("\\p{RI}\\p{RI}|\\p{Emoji}(\\p{EMod}|\\u{FE0F}\\u{20E3}?|[\\u{E0020}-\\u{E007E}]+\\u{E007F})?(\\u{200D}\\p{Emoji}(\\p{EMod}|\\u{FE0F}\\u{20E3}?|[\\u{E0020}-\\u{E007E}]+\\u{E007F})?)*|.","gu"),J={left:0,top:0,width:0,height:0},ue=(e,t)=>{for(;++t{e.innerHTML=t,i?e.setAttribute("aria-label",i):e.removeAttribute("aria-label"),n?e.setAttribute("aria-hidden",n):e.removeAttribute("aria-hidden")},ne=(e,t)=>{if(t){let i=new Set(e.join("").match(t)||Q),n=e.length,a,c,l,o;if(i.size)for(;--n>-1;){c=e[n];for(l of i)if(l.startsWith(c)&&l.length>c.length){for(a=0,o=c;l.startsWith(o+=e[n+ ++a])&&o.lengthwindow.getComputedStyle(e).display==="inline"&&(e.style.display="inline-block"),M=(e,t,i)=>t.insertBefore(typeof e=="string"?document.createTextNode(e):e,i),X=(e,t,i)=>{let n=t[e+"sClass"]||"",{tag:a="div",aria:c="auto",propIndex:l=!1}=t,o=e==="line"?"block":"inline-block",d=n.indexOf("++")>-1,R=b=>{let m=document.createElement(a),E=i.length+1;return n&&(m.className=n+(d?" "+n+E:"")),l&&m.style.setProperty("--"+e,E+""),c!=="none"&&m.setAttribute("aria-hidden","true"),a!=="span"&&(m.style.position="relative",m.style.display=o),m.textContent=b,i.push(m),m};return d&&(n=n.replace("++","")),R.collection=i,R},fe=(e,t,i,n)=>{let a=X("line",i,n),c=window.getComputedStyle(e).textAlign||"left";return(l,o)=>{let d=a("");for(d.style.textAlign=c,e.insertBefore(d,t[l]);l{var b;let m=Array.from(e.childNodes),E=0,{wordDelimiter:_,reduceWhiteSpace:B=!0,prepareText:V}=t,G=e.getBoundingClientRect(),O=G,D=!B&&window.getComputedStyle(e).whiteSpace.substring(0,3)==="pre",S=0,x=i.collection,r,f,H,s,g,y,z,h,p,k,C,T,N,L,w,u,F,v;for(typeof _=="object"?(H=_.delimiter||_,f=_.replaceWith||""):f=_===""?"":_||" ",r=f!==" ";E-1?(y=x[x.length-1],y.appendChild(document.createTextNode(n?"":u))):(y=i(n?"":u),M(y,e,s),S&&p===1&&!z&&y.insertBefore(S,y.firstChild)),n)for(C=$?ne([...$.segment(u)].map(j=>j.segment),d):u.match(o)||Q,v=0;vO.top&&k.left<=O.left){for(T=e.cloneNode(),N=e.childNodes[0];N&&N!==y;)L=N,N=N.nextSibling,T.appendChild(L);e.parentNode.insertBefore(T,e),a&&le(T)}O=k}(p=g.length?" ":r&&u.slice(-1)===" "?" "+f:f,e,s)}e.removeChild(s),S=0}else s.nodeType===1&&(l&&l.indexOf(s)>-1?(x.indexOf(s.previousSibling)>-1&&x[x.length-1].appendChild(s),S=s):(se(s,t,i,n,a,c,l,o,d,!0),S=0),a&&le(s))};const re=class ae{constructor(t,i){this.isSplit=!1,he(),this.elements=ee(t),this.chars=[],this.words=[],this.lines=[],this.masks=[],this.vars=i,this.elements.forEach(l=>{var o;i.overwrite!==!1&&((o=l[Z])==null||o._data.orig.filter(({element:d})=>d===l).forEach(ie)),l[Z]=this}),this._split=()=>this.isSplit&&this.split(this.vars);let n=[],a,c=()=>{let l=n.length,o;for(;l--;){o=n[l];let d=o.element.offsetWidth;if(d!==o.width){o.width=d,this._split();return}}};this._data={orig:n,obs:typeof ResizeObserver!="undefined"&&new ResizeObserver(()=>{clearTimeout(a),a=setTimeout(c,200)})},U(this),this.split(i)}split(t){return(this._ctx||de).add(()=>{this.isSplit&&this.revert(),this.vars=t=t||this.vars||{};let{type:i="chars,words,lines",aria:n="auto",deepSlice:a=!0,smartWrap:c,onSplit:l,autoSplit:o=!1,specialChars:d,mask:R}=this.vars,b=i.indexOf("lines")>-1,m=i.indexOf("chars")>-1,E=i.indexOf("words")>-1,_=m&&!E&&!b,B=d&&("push"in d?new RegExp("(?:"+d.join("|")+")","gu"):d),V=B?new RegExp(B.source+"|"+te.source,"gu"):te,G=!!t.ignore&&ee(t.ignore),{orig:O,animTime:D,obs:S}=this._data,x;(m||E||b)&&(this.elements.forEach((r,f)=>{O[f]={element:r,html:r.innerHTML,ariaL:r.getAttribute("aria-label"),ariaH:r.getAttribute("aria-hidden")},n==="auto"?r.setAttribute("aria-label",(r.textContent||"").trim()):n==="hidden"&&r.setAttribute("aria-hidden","true");let H=[],s=[],g=[],y=m?X("char",t,H):null,z=X("word",t,s),h,p,k,C;if(se(r,t,z,y,_,a&&(b||_),G,V,B,!1),b){let T=q(r.childNodes),N=fe(r,T,t,g),L,w=[],u=0,F=T.map(P=>P.nodeType===1?P.getBoundingClientRect():J),v=J,j;for(h=0;hv.top&&j.left{var oe;return(oe=P.parentNode)==null?void 0:oe.removeChild(P)})}if(!E){for(h=0;h{let f=r.cloneNode();return r.replaceWith(f),f.appendChild(r),r.className&&(f.className=r.className.trim()+"-mask"),f.style.overflow="clip",f}))),this.isSplit=!0,I&&b&&(o?I.addEventListener("loadingdone",this._split):I.status==="loading"&&console.warn("SplitText called before fonts loaded")),(x=l&&l(this))&&x.totalTime&&(this._data.anim=D?x.totalTime(D):x),b&&o&&this.elements.forEach((r,f)=>{O[f].width=r.offsetWidth,S&&S.observe(r)})}),this}kill(){let{obs:t}=this._data;t&&t.disconnect(),I==null||I.removeEventListener("loadingdone",this._split)}revert(){var t,i;if(this.isSplit){let{orig:n,anim:a}=this._data;this.kill(),n.forEach(ie),this.chars.length=this.words.length=this.lines.length=n.length=this.masks.length=0,this.isSplit=!1,a&&(this._data.animTime=a.totalTime(),a.revert()),(i=(t=this.vars).onRevert)==null||i.call(t,this)}return this}static create(t,i){return new ae(t,i)}static register(t){A=A||t||window.gsap,A&&(q=A.utils.toArray,U=A.core.context||U),!K&&window.innerWidth>0&&(I=document.fonts,K=!0)}};re.version="3.14.2";let Y=re;W.SplitText=Y,W.default=Y;if (typeof(window)==="undefined"||window!==W){Object.defineProperty(W,"__esModule",{value:!0})} else {delete W.default}});